<template>
	<div class="">
		<img src="../../../../assets/new/canvas_img.png" ref="img">
		<canvas id="canvas" width="550" height="20" class="can"></canvas>
	</div>
</template>

<script>
	export default{
		data(){
			return {
				img:''
			}
		},
		mounted(){
			let a = 0
			const canvas = document.getElementById('canvas');
			const ctx = canvas.getContext('2d');
			setInterval(() => {
			    a++
			    ctx.clearRect(0,0,300,300)
			    ctx.drawImage(this.$refs.img,a,0,212,38);
			}, 100);
		},
		methods:{
			
		}
	}
</script>

<style scoped>
	img{
		width: 0;
		height: 0;
	}
	.can{
		margin-top: -24px;
	}
</style>
